<?php
class hotelAction extends Action{
	
	/**
	 * 客栈列表
	 */
	function hotellist(){
		$mr=M("hotel");
		$MenuId=585;//定义本栏目的MenuId
		//获取这个表的配置信息
		$sql="select * from ".DQ."menusys where menusys0=".$MenuId;
		$rsm=$mr->query($sql);
		if($rsm[0]){
			//分解配置的参数
			$subsql="";
		}
		
		$sql="select *,
		(select classsys1 from ".DQ."classsys where classsys0=a.hotel4) as kzclass,
		(select classsys1 from ".DQ."classsys where classsys0=a.hotel22) as hezuofs,
		(select classsys1 from ".DQ."classsys where classsys0=a.hotel5) as areav,
		(select classsys1 from ".DQ."classsys where classsys0=a.hotel23) as isshenhe
		from ".DQ."hotel as a order by hotel0 desc";
		$rs=fanye($mr,$sql,3,$type="2");
		$this->assign("rs",$rs["rs"]);
		$this->assign("MenuId",$MenuId);
		$this->assign("show",$rs["show"]);
		$this->display();
		
	}
	
 	/**
	 * 获取并返回线路类的一条记录
	 * @param $wheresql  查询的sql语句
	 * @return 返回线路类的单条记录  失败返回null
	 */
	public function getrsone($wheresql)
	{
		
		$rsc=M("hotel");
		$rs= $rsc->where($wheresql)->find();
		
		$this->assign("rs",$rs);
		return ($rs)?$rs:"";
		
	}
	
	
}

?>